package param.pub;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;

import utils.jacson.CustomDateDeserializer;
import utils.jacson.CustomDateTimeDeserializer;

@Entity
@Table(name = "payrecord")
public class PayRecord implements Serializable {

	private static final long serialVersionUID = 3160210962003385237L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;
	//@Id
	private String orderno;//	订单号	String	40	Y	
	//@Id
	private String paytype;//	支付类型	String	10	Y	支付类型:付款、退款
	//@Id
	private String paymethod;//	支付方式	String	10	Y	0-现金；1-贵客卡积分;2-贵客卡余额；3银联卡 ；4：支付宝5：微信
	//@Id
	@JsonDeserialize(using=CustomDateTimeDeserializer.class)
	private Date paytime;//	支付时间	String	19	Y	yyyy-MM-dd HH:mm:ss
	private Long hashid;
	private String payno;//	支付交易号	String	40	N	
	private String orgcode;//	发车站	String	10	Y	
	private String orderstatus;//	订单状态	String	10	Y	0 新建立、1 已完成、2已取消
	@JsonDeserialize(using=CustomDateDeserializer.class)
	private Date departdate;//	发车日期	String	10	Y	yyyy-MM-dd
	private String departtime;//		发车时间	String	5	Y	HH:mm
	private String schedulecode;//	班次号	String	20	Y	
	private String seattype;//	座位类型	String	20	Y	普通座、商务座、卧铺等等
	private String reachstationname;//	到达站名称	String	100	Y	
	private Integer seatnum;//	购票张数	Int		Y	
	private Double amount;//	订单金额	Double		Y	
	@JsonDeserialize(using=CustomDateTimeDeserializer.class)
	private Date ordertime;//		订单创建时间	String 	19	Y	yyyy-MM-dd HH:mm:ss
	private String payresult;//	支付结果	String	10	N	0 支付失败 、1支付成功
	private String payresultinfo;//	支付结果说明信息	String	1000	N	
	private String payrequest;//	支付请求内容	String	2000	Y	
	private String payresponse;//		支付返回内容	String	2000	N	
	private String terminalno;//	自助机终端号	String	20	Y	
	private String commercialno;//	商户号	String	20	N	
	private String unionterminalno;//		银联终端号	String	8	N	
	private String bankcardno;//	银行卡号	String	20	N	
	private String batchno;//		银联批次号	String	10	N	
	private String selfpayway;//	自助机支付方	
	private String payplatform;//		支付收单平	
	private String paymethodname;//		支付方式名称	
	private String payplatformname;//		支付平台名称	
	private String serialno;//	银联终端流水号（查询号）	String	10	N	
	private String authno;//	银联授权码	String	20	N	
	private String referno;//	参考号（POS中心流水号）	String	20	N	
	@JsonDeserialize(using=CustomDateTimeDeserializer.class)
	private Date updatetime;//		更新时间	String	19	Y	yyyy-MM-dd HH:mm:ss
	@JsonDeserialize(using=CustomDateTimeDeserializer.class)
	private Date createtime;
	
	public PayRecord(){};
	
	public PayRecord(String orderno,String paytype,String paymethod,Date paytime,Long hashid,String payno,String orgcode,String orderstatus,Date departdate,String departtime,String schedulecode,String seattype,String reachstationname,Integer seatnum,Double amount,Date ordertime,String payresult,String payresultinfo,String payrequest,String payresponse,String terminalno,String commercialno,String unionterminalno,String bankcardno,String batchno,String selfpayway,String payplatform,String paymethodname,String payplatformname,String serialno,String authno,String referno,Date updatetime,Date createtime){
		this.orderno=orderno;
		this.paytype=paytype;
		this.paymethod=paymethod;
		this.paytime=paytime;
		this.hashid=hashid;
		this.payno=payno;
		this.orgcode=orgcode;
		this.orderstatus=orderstatus;
		this.departdate=departdate;
		this.departtime=departtime;
		this.schedulecode=schedulecode;
		this.seattype=seattype;
		this.reachstationname=reachstationname;
		this.seatnum=seatnum;
		this.amount=amount;
		this.ordertime=ordertime;
		this.payresult=payresult;
		this.payresultinfo=payresultinfo;
		this.payrequest=payrequest;
		this.payresponse=payresponse;
		this.terminalno=terminalno;
		this.commercialno=commercialno;
		this.unionterminalno=unionterminalno;
		this.bankcardno=bankcardno;
		this.batchno=batchno;
		this.selfpayway=selfpayway;
		this.payplatform=payplatform;
		this.paymethodname=paymethodname;
		this.payplatformname=payplatformname;
		this.serialno=serialno;
		this.authno=authno;
		this.referno=referno;
		this.updatetime=updatetime;
		this.createtime=createtime;
	}
	public String getSelfpayway() {
		return selfpayway;
	}
	public void setSelfpayway(String selfpayway) {
		this.selfpayway = selfpayway;
	}
	public String getPayplatform() {
		return payplatform;
	}
	public void setPayplatform(String payplatform) {
		this.payplatform = payplatform;
	}
	public String getPaymethodname() {
		return paymethodname;
	}
	public void setPaymethodname(String paymethodname) {
		this.paymethodname = paymethodname;
	}
	public String getPayplatformname() {
		return payplatformname;
	}
	public void setPayplatformname(String payplatformname) {
		this.payplatformname = payplatformname;
	}
	public String getOrderno() {
		return orderno;
	}
	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}
	public String getPaytype() {
		return paytype;
	}
	public void setPaytype(String paytype) {
		this.paytype = paytype;
	}
	public String getPaymethod() {
		return paymethod;
	}
	public void setPaymethod(String paymethod) {
		this.paymethod = paymethod;
	}
	public Date getPaytime() {
		return paytime;
	}
	public void setPaytime(Date paytime) {
		this.paytime = paytime;
	}
	public String getPayno() {
		return payno;
	}
	public void setPayno(String payno) {
		this.payno = payno;
	}
	public String getOrgcode() {
		return orgcode;
	}
	public void setOrgcode(String orgcode) {
		this.orgcode = orgcode;
	}
	public String getOrderstatus() {
		return orderstatus;
	}
	public void setOrderstatus(String orderstatus) {
		this.orderstatus = orderstatus;
	}
	public Date getDepartdate() {
		return departdate;
	}
	public void setDepartdate(Date departdate) {
		this.departdate = departdate;
	}
	public String getDeparttime() {
		return departtime;
	}
	public void setDeparttime(String departtime) {
		this.departtime = departtime;
	}
	public String getSchedulecode() {
		return schedulecode;
	}
	public void setSchedulecode(String schedulecode) {
		this.schedulecode = schedulecode;
	}
	public String getSeattype() {
		return seattype;
	}
	public void setSeattype(String seattype) {
		this.seattype = seattype;
	}
	public String getReachstationname() {
		return reachstationname;
	}
	public void setReachstationname(String reachstationname) {
		this.reachstationname = reachstationname;
	}
	public Integer getSeatnum() {
		return seatnum;
	}
	public void setSeatnum(Integer seatnum) {
		this.seatnum = seatnum;
	}
	public Double getAmount() {
		return amount;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	public Date getOrdertime() {
		return ordertime;
	}
	public void setOrdertime(Date ordertime) {
		this.ordertime = ordertime;
	}
	public String getPayresult() {
		return payresult;
	}
	public void setPayresult(String payresult) {
		this.payresult = payresult;
	}
	public String getPayresultinfo() {
		return payresultinfo;
	}
	public void setPayresultinfo(String payresultinfo) {
		this.payresultinfo = payresultinfo;
	}
	public String getPayrequest() {
		return payrequest;
	}
	public void setPayrequest(String payrequest) {
		this.payrequest = payrequest;
	}
	public String getPayresponse() {
		return payresponse;
	}
	public void setPayresponse(String payresponse) {
		this.payresponse = payresponse;
	}
	public String getTerminalno() {
		return terminalno;
	}
	public void setTerminalno(String terminalno) {
		this.terminalno = terminalno;
	}
	public String getCommercialno() {
		return commercialno;
	}
	public void setCommercialno(String commercialno) {
		this.commercialno = commercialno;
	}
	public String getUnionterminalno() {
		return unionterminalno;
	}
	public void setUnionterminalno(String unionterminalno) {
		this.unionterminalno = unionterminalno;
	}
	public String getBankcardno() {
		return bankcardno;
	}
	public void setBankcardno(String bankcardno) {
		this.bankcardno = bankcardno;
	}
	public String getBatchno() {
		return batchno;
	}
	public void setBatchno(String batchno) {
		this.batchno = batchno;
	}
	public String getSerialno() {
		return serialno;
	}
	public void setSerialno(String serialno) {
		this.serialno = serialno;
	}
	public String getAuthno() {
		return authno;
	}
	public void setAuthno(String authno) {
		this.authno = authno;
	}
	public String getReferno() {
		return referno;
	}
	public void setReferno(String referno) {
		this.referno = referno;
	}
	public Date getUpdatetime() {
		return updatetime;
	}
	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public Date getCreatetime() {
		return createtime;
	}
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
	public Long getHashid() {
		return hashid;
	}
	public void setHashid(Long hashid) {
		this.hashid = hashid;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
}
